import request from '@/utils/request'

// 查询学生列表
export function studentList(data, pageNum = 1, pageSize = 10) {
  return request({
    url: `/student/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'post',
    data
  })
}

// 删除学生
export function delStudent(id) {
  return request({
    url: '/student/removeById?request=' + id,
    method: 'post',
    data: {}
  })
}


// 新增/修改学生
export function addOrUpdateStudent(data) {
  return request({
    url: '/student/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 获取学生详情
export function getStudentById(id) {
  return request({
    url: '/student/getStudentInfoById?request=' + id,
    method: 'post',
    data: {}
  })
}

